<template>
	<view class="container">
			<view class="school-new-box" v-for="(item,index) in data" :key="index" @click="toUrl(item.id)">	
				<view class="school-new-box-right">
					<view class="school-news-box-right-title">
					{{item.title}}
					</view>
					<view class="school-news-box-right-number">
					{{item.browseNum}}浏览	
					</view>
				</view>
			</view>
	</view>
</template>

<script>
	export default {
		name:"component-detail",
		props:{
			data:{
				type:Array,
			}
		},
		data() {
			return {
			};
		},
		methods:{
			toUrl(id){
				uni.navigateTo({
					url:'../../subpages/news-detail/news-detail?id='+id
				})
			}
		}
	}
</script>

<style lang="scss">
.container{
	width: 100%;
	box-sizing: border-box;
	background-color: #fff;
	padding: 0 20rpx;
		.school-new-box{
			padding: 20rpx 0;
			border-bottom: 1px solid #f4f4f4;
				.school-new-box-right{
					margin-left: 16rpx;
				}
		}
}
.school-new-box-right>.school-news-box-right-title{
	    font-family: NotoSansHans-Regular;
	    font-size: 15px;
	    font-weight: 700;
	    font-stretch: normal;
	    line-height: 23px;
	    letter-spacing: 0px;
	    color: #000;
	    display: -webkit-box;
	    text-overflow: ellipsis;
	    overflow: hidden;
}
.school-new-box-right>.school-news-box-right-number{
		margin-top: 14px;
	    font-family: NotoSansHans-Regular;
	    font-size: 12px;
	    font-weight: 400;
	    font-stretch: normal;
	    line-height: 34px;
	    letter-spacing: 0px;
	    color: grey;
}
</style>